import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/global.css'
import axios from 'axios'
import qs from 'qs'
//    "@vue/cli-plugin-eslint": "~4.5.0",


Vue.config.productionTip = false

// 配置默认访问路径
axios.defaults.baseURL = 'http://localhost:7000/'
// 跨域时允许提交cookie
// axios.defaults.withCredentials = true
axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('RICERVCVCER-TOKEN')
  // 在最后必须 return config
  return config
})
// 将axios对象保存到Vue的属性prototype中
Vue.prototype.$http = axios

// 将qs直接加入到Vue的prototype中
Vue.prototype.$qs = qs

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
